package com.wangfa.provider.controller;


import com.wangfa.provider.entity.Company;
import com.wangfa.provider.repository.CompanyRepository;
import com.wangfa.provider.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangfa
 * @since 2020-08-25
 */
@RestController
@RequestMapping("/company")
public class CompanyController {

   /* @Autowired
    private CompanyService companyService;

    @RequestMapping("list")
    public List<Company>list(){
        List<Company> list = companyService.list(null);
        return list;
    }*/
   @Autowired
    CompanyRepository companyRepository;
   
   
   @RequestMapping("list")
    public List<Company> list(){
       return companyRepository.findAll();
   }

    /*@RequestMapping("save")
    public boolean save(@RequestBody Company company){
        return null;
    }*/
   
   

}

